Skip to content

Keep the Playwright UI tests passing on GitOps 1.20 through 1.23 - #1639

Open
trdoyle81 wants to merge 1 commit into
redhat-developer:masterfrom
trdoyle81:ui-e2e-across-gitops-1.20-1.23
Open

trdoyle81 wants to merge 1 commit into
redhat-developer:masterfrom
trdoyle81:ui-e2e-across-gitops-1.20-1.23

Conversation

@trdoyle81

Copy link
Copy Markdown
Member

What does this PR do?

The Observe tests were tripping over console differences between GitOps 1.20 and 1.23.

Newer consoles label Administrator as "Core platform". If kubeadmin was last on Developer, the dashboards URL lands on the project picker, and the developer metrics page only shows up in the Developer perspective. The welcome tour can also pop up over the dashboards dropdown, so the test clicks Skip tour when that dialog is actually there.

Developer metrics leaves kubeadmin on Developer. Monitoring puts the console user settings back afterwards. If Developer is switched off on the cluster, monitoring turns it on and waits until the old console pods are gone.

Connect Repo on Argo CD 3.6 has the label in a span inside the button. Matching the text as well hits both. The button name is the same back to 3.3, so the test just uses the button.

PR acceptance criteria:

  • Documentation was updated and verified using make serve-docs
    No docs in this one.
  • Unit tests were updated
    No unit tests in this one. It's the Playwright suite.
  • E2E tests were updated

What type of PR is this?

/kind failing-test

Special notes to the reviewer:

Verified on Fips and non-Fips clusters on gitops versions: 1.20, 1.21, 1.22, and 1.23.0.

Run all tests:
./run-ui-tests.sh --project=chromium --workers=1 --trace on

Run just monitoring suite only:
./run-ui-tests.sh --suite=monitoring --project=chromium --workers=1 --trace on --headed

Signed-off-by: Triona Doyle <trdoyle@redhat.com>
@openshift-ci openshift-ci Bot added the kind/failing-test Categorizes issue or PR as related to a frequently failing test. label Dec 4, 2026
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Improved end-to-end test setup for administrator and developer perspectives, including handling of the console tour and verification that dashboards and metrics pages load.
    • Added automatic restoration of developer-perspective settings after tests, preserving existing settings or removing test-created settings as appropriate.
    • Updated repository connection checks to use the control’s accessible button name.

The E2E test setup now enables and restores developer-perspective settings, and console page objects select perspectives before navigation. Tour dismissal uses a page-level locator handler. The repository settings page now identifies Connect Repo only by button role and accessible name.

Changes: Console E2E perspective setup

Layer / File(s) Summary
Worker perspective and settings state
test/ui-e2e/src/fixtures/monitoring.ts
The worker fixture enables the developer perspective when disabled. It snapshots user settings and restores the prior ConfigMap state after use.
Tour handling and perspective selection
test/ui-e2e/src/pages/console/tour.ts, test/ui-e2e/src/pages/console/perspective.ts
Tour dismissal registers a page-level locator handler. The perspective helper identifies and selects the requested perspective.
Console page perspective setup
test/ui-e2e/src/pages/console/DashboardsPage.ts, test/ui-e2e/src/pages/console/MetricsPage.ts
Dashboard and metrics page objects select a perspective before navigation. They also verify the target page and accept the updated metrics heading. Repository settings selector
Layer / File(s) Summary
Connect Repo button locator
test/ui-e2e/src/pages/SettingsRepositoriesPage.ts
The locator now uses the button role and accessible name without an exact-text fallback.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant DashboardPage
  participant TourHandler
  participant PerspectiveSelector
  participant OpenShiftConsole
  DashboardPage->>OpenShiftConsole: Open console root
  DashboardPage->>TourHandler: Dismiss console tour
  DashboardPage->>PerspectiveSelector: Select administrator perspective
  PerspectiveSelector->>OpenShiftConsole: Select perspective toggle and menu item
  DashboardPage->>OpenShiftConsole: Navigate to dashboards
  DashboardPage->>TourHandler: Dismiss console tour
Loading
Merge Risk: Minimal · up to 0c1ee

These changes only affect the Playwright UI tests, which now handle perspective selection, the welcome tour, and restoring console settings. No concrete problem was found that would break the tests or production. Merging carries little risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title 'Keep the Playwright UI tests passing on GitOps 1.20 through 1.23' matches the main purpose of the changeset. The changes adjust the Playwright UI tests (Observe, monitoring, dashboards, met…
Description check Passed The description explains the console differences between GitOps 1.20 and 1.23 (Core platform label, perspective handling, welcome tour, console user settings restoration, Connect Repo button locator o…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title 'Keep the Playwright UI tests passing on GitOps 1.20 through 1.23' matches the main purpose of the changeset. The changes adjust the Playwright UI tests (Observe, monitoring, dashboards, metrics, perspective handling, tour dismissal, Connect Repo locator) so they work across GitOps 1.20 to 1.23 console differences. The title is concise and specific enough.

Full details: Description check

Explanation

The description explains the console differences between GitOps 1.20 and 1.23 (Core platform label, perspective handling, welcome tour, console user settings restoration, Connect Repo button locator on Argo CD 3.6). These match the changed files. It also gives verification details and run commands.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8bb6395 and 0c1eead.

Files selected for processing: 6

  • test/ui-e2e/src/fixtures/monitoring.ts
  • test/ui-e2e/src/pages/SettingsRepositoriesPage.ts
  • test/ui-e2e/src/pages/console/DashboardsPage.ts
  • test/ui-e2e/src/pages/console/MetricsPage.ts
  • test/ui-e2e/src/pages/console/perspective.ts
  • test/ui-e2e/src/pages/console/tour.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@codecov

codecov Bot commented Dec 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.01%. Comparing base (f5bdfd1) to head (0c1eead).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1639      +/-   ##
==========================================
- Coverage   70.82%   69.01%   -1.82%     
==========================================
  Files          25      119      +94     
  Lines        3873    25381   +21508     
==========================================
+ Hits         2743    17516   +14773     
- Misses       1130     7865    +6735     
Flag Coverage Δ
unit-tests 69.01% <ø> (-1.82%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/failing-test Categorizes issue or PR as related to a frequently failing test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant